package com.sxt;

import java.awt.*;

public class Bg {
    void paintSelf(Graphics g ,int fishLevel) {
        // 绘制背景图片，并根据游戏状态显示不同的文字信息。
        g.drawImage(GameUtils.bigimg, 0, 0, null);
        switch (GameWin.state) {
            case 0: // 游戏未开始状态
                GameUtils.drawWord(g, "开始", Color.red, 80, 700, 500);
                break;
            case 1: // 游戏进行中状态
                GameUtils.drawWord(g, "积分" + GameUtils.count, Color.ORANGE, 50, 200, 120);
                GameUtils.drawWord(g, "难度" + GameUtils.level, Color.ORANGE, 50, 600, 120);
                GameUtils.drawWord(g, "等级" + fishLevel, Color.ORANGE, 50, 1000, 120);
                break;
            case 2: // 游戏失败状态
                GameUtils.drawWord(g, "积分" + GameUtils.count, Color.ORANGE, 50, 200, 120);
                GameUtils.drawWord(g, "难度" + GameUtils.level, Color.ORANGE, 50, 600, 120);
                GameUtils.drawWord(g, "等级" + fishLevel, Color.ORANGE, 50, 1000, 120);
                GameUtils.drawWord(g, "失败", Color.red, 80, 700, 500);
                break;
            case 3: // 游戏胜利状态
                GameUtils.drawWord(g, "积分" + GameUtils.count, Color.ORANGE, 50, 200, 120);
                GameUtils.drawWord(g, "难度" + GameUtils.level, Color.ORANGE, 50, 600, 120);
                GameUtils.drawWord(g, "等级" + fishLevel, Color.ORANGE, 50, 1000, 120);
                GameUtils.drawWord(g, "胜利", Color.red, 80, 700, 500);
                break;
            case 4: // 游戏暂停状态
                break;
            default:
        }
    }

}
